python |
您所在的位置:网站首页 › python2 低版本 seed预测 › python |
问题陈述 我正在尝试运行一些需要 scikit-learn 18.0 的旧 Python 代码,但我安装的当前版本是 0.22,因此我收到警告/运行代码时数据无效。 我尝试过的 我尝试在终端:python -m pip install scikit-learn==0.18 和 conda 中安装特定版本,但这些都不起作用。我只能安装 v 0.22。帮助?谢谢。 终端错误 ERROR: Failed building wheel for scikit-learn Running setup.py clean for scikit-learn Failed to build scikit-learn Installing collected packages: scikit-learn Found existing installation: scikit-learn 0.22.1 Uninstalling scikit-learn-0.22.1: Successfully uninstalled scikit-learn-0.22.1 Running setup.py install for scikit-learn ... error ERROR: Command errored out with exit status 1: conda环境出错: PackagesNotFoundError: The following packages are not available from current channels: - scikit-learn==0.18 this was after creating and activating the new environment 最佳答案 一次解决一个问题: python -m pip install scikit-learn==0.18 fails 这可能是由于 scikit-learn==0.18,如果您check on pypi仅具有用于 Windows 的 python 3.5 和 2.7 的 whl 文件,因此 pip 下载源代码发行版,然后编译失败,可能是因为它不适用于较新的 python 版本 The following packages are not available from current channels 发生这种情况是因为默认 conda channel 中根本不存在 scikit-learn==18.0。在我的 win64 机器上,我可以安装的最旧版本是 19.0 (您可以通过在 cmd 中输入 conda search scikit-learn 进行检查) ,因此不幸的是无法使用默认的 conda channel 进行安装。有一个名为 free 的 channel (通过 anaconda website 找到),其中包含 scikit-learn 18.0,因此您可以安装: conda install -c free scikit-learn为了确保 python 版本兼容,我只需创建一个合适的环境: conda create -n py35 -c free scikit-learn=0.18.0关于python - 安装旧版本的 scikit-learn,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59974146/ |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |